<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>全部书籍</title>
</head>
<body>

<form action="${pageContext.request.contextPath}/Book/addBook" method="post">
    书籍名称:<input type="text" name="bookName">
    书籍数量:<input type="text" name="bookCounts">
    书籍简介:<input type="text" name="detail">
    <input type="submit" name="提交">
</form>
<hr>
<h3>${msg}</h3>
<hr>

<form action="${pageContext.request.contextPath}/Book/findBook" method="post">
    <input type="text" name="find" value="${findContext}"><input type="submit" value="查询">
</form>
<c:forEach items="${allBooks}" var="book">
    <h3>${book.bookID}</h3>
    <h3>${book.bookName}</h3>
    <h3>${book.detail}</h3>
    <h3>${book.bookCounts}</h3>
    <a href="${pageContext.request.contextPath}/Book/updateBookPage/${book.bookID}">修改</a>
    <a href="${pageContext.request.contextPath}/Book/deleteBook/${book.bookID}">删除</a>
    <hr>
</c:forEach>

</body>
</html>
